package com.luych.toolbox.base.service.entity;

import com.luych.toolbox.common.feign.param.gateway.center.WebSocketLetter;
import com.luych.toolbox.common.service.base.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "letter")
public class Letter extends BaseEntity {

    @Column(name = "user_id")
    private String userId;
    @Column(name = "type")
    private WebSocketLetter.Type type;
    @Column(name = "message")
    private String message;
    @Column(name = "content")
    private String content;
    @Column(name = "readed")
    private Boolean readed;

    public String getUserId() {
        return userId;
    }

    public Letter setUserId(String userId) {
        this.userId = userId;
        return this;
    }

    public WebSocketLetter.Type getType() {
        return type;
    }

    public void setType(WebSocketLetter.Type type) {
        this.type = type;
    }

    public String getMessage() {
        return message;
    }

    public Letter setMessage(String message) {
        this.message = message;
        return this;
    }

    public String getContent() {
        return content;
    }

    public Letter setContent(String content) {
        this.content = content;
        return this;
    }

    public Boolean getReaded() {
        return readed;
    }

    public Letter setReaded(Boolean readed) {
        this.readed = readed;
        return this;
    }

    public static Letter getInstance() {
        return new Letter();
    }
}